<?php
class SeoModel extends RelationModel{
	//自动验证
	protected $_validate = array(
		array('username','','帐号已经存在！',0,'unique',1),
		);

	//关联
	protected $_link = array(

		'role'=>array(
			'mapping_type'=>MANY_TO_MANY,
			'class_name'=>'role',
			'foreign_key'=>'user_id',
			'mapping_fields'=>'name',
			'relation_foreign_key'=>'role_id',
			'relation_table'=>'cwe_role_user'
		),

	);
}
